<div bindonce>
	<div class=" mt5 inline-block w100">
		<div class="fl">
			<button class="btn btn-primary fa-plus-square ml5" ng-click="button.addButton()" ng-if="!isSee">添加</button>
		</div>
		<div class="fr ">
			<div>
				<label> 常用按钮快捷添加：</label>
				<div class="btn-group" ng-if="!isSee">
					<button class="btn btn-primary fl" type="button" ng-click="button.custFormBtn('add')">新增</button>
					<!--<button class="btn btn-primary fl" type="button" ng-click="button.custFormBtn('setup')">参数设置</button>-->
					<button class="btn btn-danger fl" type="button" ng-click="button.custFormBtn('del')">删除</button>
					<button class="btn btn-success fl" type="button" ng-click="button.custFormBtn('edit')">编辑</button>
					<button class="btn btn-info fl" type="button" ng-click="button.custFormBtn('detail')">详情</button>
				</div>
				<div class="btn-group" ng-if="!isSee">
					<button class="btn btn-warning fl" type="button" ng-click="button.quickSaveButton('启用','status','1')">启用</button>
					<button class="btn btn-warning fl" type="button" ng-click="button.quickSaveButton('开启','status','1')">开启</button>
					<button class="btn btn-warning fl" type="button" ng-click="button.quickSaveButton('发布','status','1')">发布</button>
				</div>
				<div class="btn-group" ng-if="!isSee">
					<button class="btn btn-danger fl" type="button" ng-click="button.quickSaveButton('禁用','status','0',true)">禁用</button>
					<button class="btn btn-danger fl" type="button" ng-click="button.quickSaveButton('关闭','status','0',true)">关闭</button>
					<button class="btn btn-danger fl" type="button" ng-click="button.quickSaveButton('取消发布','status','0',true)">取消发布</button>
				</div>
				<!-- <label>自定义关键属性添加：</label> -->
				<div class="btn-group" ng-if="!isSee">
					<span class="input-group-addon fl  input-label">按钮名称</span>
					<input type="text" class="form-control must fl wd80" ng-model="button.quickData.name">
					<span class="input-group-addon fl input-label">字段key</span>
					<input type="text" class="form-control must fl  wd80" ng-model="button.quickData.status">
					<span class="input-group-addon fl input-label">对应值</span>
					<input type="text" class="form-control must fl  wd60" ng-model="button.quickData.staValue">
					<button class="btn btn-warning fl h34" type="button" ng-click="button.quickSaveButton(button.quickData.name,button.quickData.status,button.quickData.staValue)">生成</button>
				</div>
			</div>
		</div>
	</div>
	<div class="mt5">
		<table class="table table-striped table-bordered table-hover text-center table-layout-fixed">
			<thead>
				<tr>
					<th style="width: 60px" class="th-nowap">序号</th>
					<th style="width: 120px;" class="pointer-th th-nowap">效果</th>
					<th style="width: 160px;" class="pointer-th th-nowap">名称</th>
					<th style="width: 150px;" class="pointer-th th-nowap">别名</th>
					<th style="width: 136px;" class="pointer-th th-nowap">按钮类型</th>
					<th style="width: 100px;" class="pointer-th th-nowap">必选</th>
					<th style="width: 90px" class="pointer-th th-nowap">图标</th>
					<th style="width: 156px;" class="pointer-th th-nowap">样式</th>
					<th style="width: 150px;" class="pointer-th th-nowap">提醒内容</th>
					<th style="width: 150px;" class="pointer-th th-nowap">成功提醒</th>
					<th style="width: 150px;" class="pointer-th th-nowap">数值变化</th>
					<th style="width: 150px"  class="pointer-th th-nowap">跳转链接/请求地址</th>
					<th style="width: 150px;" class="pointer-th th-nowap">打开方式</th>
					<th style="width: 150px;" class="pointer-th th-nowap">显示条件</th>
					<th style="width: 150px;" class="pointer-th th-nowap">菜单权限控制</th>
					<th style="width: 100px">操作</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="item in button.buttonList | orderBy:'sn' track by $index" ng-click="button.genBtnJson(item)">
					<td>{{$index+1}}</td>
					<td class="th-nowap">
						<button class="btn" ng-class="item.btncss">
							<i class="fa" ng-class="item.icon"></i>
							{{item.name}}
						</button>
					</td>
					<td class="th-nowap">
						<input class="form-control" type="text" ng-model="item.name" ab-validate="{required:true}" ng-disabled="isSee" />
					</td>
					<td class="th-nowap">
						<input class="form-control" type="text" ng-model="item.alias" ab-validate="{required:true}" ng-disabled="isSee" />
					</td>
					<td class="th-nowap">
						<select class="form-control must" ng-model="item.type" ng-options="k as v for (k,v) in service.btnTypes" ab-parse-data ab-validate="{required:true}" ng-disabled="isSee">
							<option value="">请选择</option>
						</select>
					</td>
					<td class="th-nowap">
						<span ab-boolean="1/0" class="checkbox" text="是/否" ng-model="item.mustSelect" ab-validate="{required:true}" ng-disabled="isSee"  ng-if="item.type==2"></span>
					</td>
					<td class="th-nowap">
						<span class="fa {{item.icon}} fs20 icons-noselect"></span>
						<ab-icon-select ng-model="item.icon" ng-if="!isSee"></ab-icon-select>
					</td>
					<td class="th-nowap">
						<select class="form-control must" ng-model="item.btncss" ng-options="k as v for (k,v) in service.btnStyleTypes" ab-parse-data ab-validate="{required:true}" ng-disabled="isSee">
							<option value="">请选择</option>
						</select>
					</td>
					<td class="th-nowap">
						<input class="form-control" type="text" ng-model="item.warnTxt" placeholder="如果为空,则不提醒" ng-disabled="isSee" />
					</td>
					<td class="th-nowap">
						<input class="form-control" type="text" ng-model="item.successTxt" ng-disabled="isSee" />
					</td>
					<td class="th-nowap">
						<!-- 数值变化 -->
						<input class="form-control" type="text" ng-model="item.dataChange" placeholder="比如 stu1=1;stu2=2" ng-if="item.clickType==1" ng-disabled="isSee" />
					</td>
					<td class="th-nowap">
						<input class="form-control" style="max-width: 560px;" type="text" ng-model="item.url" ab-validate="{required:false}" ng-if="item.clickType!=1" ng-disabled="isSee">
					</td>
					<td class="th-nowap">
						<span ng-click="openSetting.open(item.expand,'hrefSetting',service.btnClickTypes)" class="pointer">设置</span>
					</td>
					<td class="th-nowap">
						<input class="form-control" type="text" ng-model="item.exp" ab-validate="{required:true}" placeholder="比如 item.stu1==1" ng-disabled="isSee" />
					</td>
					<td class="th-nowap">
						<span ab-boolean="1/0" class="checkbox" text="是/否" ng-model="item.joinBtnRight" ab-validate="{required:true}" ng-disabled="isSee"></span>
					</td>
					<td class="th-nowap">
						<div ab-button-tools="iDontEvenUseThis" parent="thisScope" list="button.buttonList" list-key="'button.buttonList'" index="{{$index}}" no-confirm="true" copy="true" no-sort="false" sort-key="'sn'" ng-if="!isSee">
							<!-- <a href="javascript:void(0);" title="设置" class="btn glyphicon glyphicon-cog wd10" ng-click="test()"></a> -->
						</div>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>